Fixed sign in null bugs, refactor needed. Updated formatting