login + register logic - brief implementation