Added auto login after registration...
fix bug: thread