Added some functionality to loginVC and regVC