Add a better login error & cleanup