Login changes + some error handling.