diff --git a/lib/Lufi.pm b/lib/Lufi.pm
index 4ca9945..92ba6af 100755
--- a/lib/Lufi.pm
+++ b/lib/Lufi.pm
@@ -11,7 +11,7 @@ $ENV{MOJO_MAX_WEBSOCKET_SIZE} = 100485760; # 10 * 1024 * 1024 = 10MiB
 # This method will run once at server start
 sub startup {
     my $self = shift;
-    my $entry = undef;
+    my $entry;
 
     my $config = $self->plugin('Config' => {
         default =>  {
@@ -84,14 +84,14 @@ sub startup {
                     my $mesg = $ldap->bind($c->config->{ldap}->{bind_user}.$c->config->{ldap}->{bind_dn},
                         password => $c->config->{ldap}->{bind_pwd}
                     );
-    
+
                     $mesg->code && die $mesg->error;
-    
+
                     $mesg = $ldap->search(
                         base   => $c->config->{ldap}->{user_tree},
                         filter => "(&(uid=$username)".$c->config->{ldap}->{user_filter}.")"
                     );
-    
+
                     if ($mesg->code) {
                         $c->app->log->error($mesg->error);
                         return undef;
@@ -103,18 +103,18 @@ sub startup {
                         $c->app->log->info("[LDAP authentication failed] - User $username filtered out, IP: ".$c->ip);
                         return undef;
                     }
- 
+
                     # Now we know that the user exists, and that he is authorized by the filter
                     $mesg = $ldap->bind('uid='.$username.$c->config->{ldap}->{bind_dn},
                         password => $password
                     );
-    
+
                     if ($mesg->code) {
                         $c->app->log->info("[LDAP authentication failed] login: $username, IP: ".$c->ip);
                         $c->app->log->error("[LDAP authentication failed] ".$mesg->error);
                         return undef;
                     }
-    
+
                     $c->app->log->info("[LDAP authentication successful] login: $username, IP: ".$c->ip);
                 } elsif (defined($c->config('htpasswd'))) {
                     my $htpasswd = new Apache::Htpasswd({passwdFile => $c->config->{htpasswd},
@@ -285,7 +285,7 @@ sub startup {
 
             if($c->authenticate($login, $pwd)) {
                 $c->redirect_to('index');
-            } elsif (defined $entry) { 
+            } elsif (defined $entry) {
                     $c->stash(msg => $c->l('Please, check your credentials: unable to authenticate.'));
                     $c->render(template => 'login');
                 } else {