Fix some error handling, change login process