Improved login test