fixed some syntax errors
adding redirect to login pageif not logged in
fixed merge conflicts