Corrected some crashes and some issues with login and register