Final fix for Login problem