Changes to init so check_login works