Fixed notes, added login functionality

Fixed notes bug - everything works now.
Added login check functionality