moved sign_in filter to helper
minor fixes
code cleanup