Added automatic login after registration