Added automatic login after user registers.