login register refactor

add registration etc