fixed unpleasant bugs in login + new features