Improved login and testing