Improved login module